package com.ls.springbootdemo.common.exception;

/**
 * 自定义公共异常
 *
 * @author 挥之以墨
 */
public class MyException extends RuntimeException {
    private String errCode;
    private String errMsg;

    public MyException() {
        super();
    }

    public MyException(String message, Throwable cause) {
        super(message, cause);
    }

    public MyException(String message) {
        super(message);
        this.errMsg = message;
    }

    public MyException(Throwable cause) {
        super(cause);
    }

    public MyException(String errCode, String errMsg) {
        super(errCode + ":" + errMsg);
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    public String getErrCode() {
        return this.errCode;
    }

    public String getErrMsg() {
        return this.errMsg;
    }

}
